package service.impl;

import dao.CommentDao;
import domain.ShowComment;
import domain.VirtualComment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import service.CommentService;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {

    @Autowired
    private CommentDao commentDao;

    @Override
    public List<ShowComment> getCommentById(int id) {
        return commentDao.getById(id);
    }

    @Override
    public void addComment(VirtualComment virtualComment) {
        commentDao.addComment(virtualComment);
    }
}
